define(['../app'], function(app) {
    class Module {
        constructor(moduleId, moduleName, url, desc = "") {
            this.moduleId = moduleId;
            this.moduleName = moduleName;
            this.url = url;
            this.desc = desc;
            this.children = [];
        }
    }
    class Function {
        constructor(functionId, functionName, url, desc = "") {
            this.functionId = functionId;
            this.functionName = functionName;
            this.url = url;
            this.desc = desc;
        }
    }

    let list = [];

    let baseModule = new Module(1, 'Base', 'base', 'base Infomation');
    baseModule.children.push(new Function(1, 'center_all', 'base.center_all', 'angular基础'));
    baseModule.children.push(new Function(2, 'center horizontally', 'base.horizontally', 'angular分享'));
    list.push(baseModule);


    let promoteModule = new Module(2, 'Promote', 'promote', 'promote Infomation');
    promoteModule.children.push(new Function(1, 'clearfix', 'promote.clearfix', '[代码段] 清楚浮动'))
    promoteModule.children.push(new Function(1, 'flex', 'promote.flex', 'flex'))
    list.push(promoteModule);

    app.constant('menu', {
        list
    })
})